<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=1.0"/>
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="telephone=no" name="format-detection"/>
    <title>注册</title>
    <link rel="stylesheet" href="css/H-ui.reset.css">
    <link rel="stylesheet" href="css/tongyong.css">
    <link rel="stylesheet" href="css/style.css">
    <link rel="stylesheet" href="css/alert.css">
    <link rel="stylesheet" href="css/myStyle.css" >
</head>
<body>
	<div class="main">
		<p align="center" >
			<img style="background-color: #FF8C00;width:100%;" src="images/reg-bg.png" />
		</p>
	</div>
	<p class="log_line"><a href="login.html">账号登录</a></p>
	<p class="reg_line"><a href="#">注册</a></p>
	
	<p class="reglog_line_info"></p>
	<p class="phoneno_line_info"></p>
	
	<!-- <div class="applyMain"> -->
		<div class="regRow">
			<img src="images/detail_07.png">
			<input class="flexLong" id="phoneNo" type="text" maxlength="11" placeholder="手机号码" />
			<input class="flexLong" type="button" value="获取验证码"  onclick="settime(this)" id="getCode" />
		</div>
	<!-- </div> -->
	<p class="passwd_line_info"></p>
	<article class="applyMain">
		<div class="formRwow">
			<img src="images/detail_08.png">
			<input class="flexLong" id="code" type="text" maxlength="11" placeholder="请输入验证码" />
		</div>
	</article>
	<p class="passwd_line_info"></p>
	<article class="applyMain">
		<div class="formRwow">
			<img src="images/detail_07.png">
			<input class="flexLong" id="qrCode" type="text" maxlength="10" placeholder="请输入邀请码(选填)" />
		</div>
	</article>
	<p class="passwd_line_info"></p>
	<article class="applyMain">
		<div class="formRwow">
			<img src="images/detail_07.png">
			<input class="flexLong" id="password" type="password" maxlength="20" placeholder="请输入密码" />
		</div>
	</article>
	<p class="reg_form_background">
		<span>密码由6-20位数字,字母组成</span>
	</p>
	<div class="login_div"><button class="login_btn" id="register">注册</button></div>
	
	
	
	<script src="//cdn.bootcss.com/jquery/1.9.1/jquery.min.js"></script>
	<script type="text/javascript" src="js/register.js"></script> 
	<script type="text/javascript" src="js/config.js"></script>
	<script type="text/javascript" src="js/alert.js"></script>
	<script type="text/javascript">

			$(".reg_line a").css({color: "#000000"});
	
			// 发送验证码倒计时
			var countdown=60; 
			function settime(obj) {
				var phoneNo = $("#phoneNo").val();

				if (phoneNo == null || phoneNo.length == 0) {
					alert("手机号不能为空");
					return false; 
				}
				//判断是否是手机号
				var myreg = /^(((13[0-9]{1})|(14[0-9]{1})|(15[0-9]{1})|(17[0-9]{1})|(18[0-9]{1}))+\d{8})$/; 
				if(!myreg.test(phoneNo)) 
				{ 
				    alert('请输入有效的手机号码！'); 
				    return false; 
				}else{
					if (countdown == 0) { 
			        obj.removeAttribute("disabled");    
			        obj.value="获取验证码"; 
			        obj.style.backgroundColor = "#fff";
			        obj.style.color = "#FFC620";
			        obj.style.borderColor = "#FFC620";
			        countdown = 60; 
			        return;
			    	} else { 
			        obj.setAttribute("disabled", true); 
			        obj.value="重新发送(" + countdown + ")";
			        obj.style.backgroundColor = "#BFBEBE";
			        obj.style.color = "#fff";
			        obj.style.borderColor = "#fff";
			        countdown--; 
			    	} 
				    setTimeout(function() { 
				    	settime(obj) 
				    	},1000) 
				}
			}
			
	</script>
</body>
</html>
